﻿using Acme.BookStore.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Domain.Repositories;
using WorkflowCore.Interface;
using WorkflowCore.Models;

namespace Acme.BookStore.WorkflowStepBody
{
    /// <summary>
    ///  部长 流程 步骤点 
    /// </summary>

    public class HelloWorld : StepBody
    {

        IRepository<User, Guid> db;

        public HelloWorld(IRepository<User, Guid> repository)
        {
            db = repository;
        }

        public  override ExecutionResult Run(IStepExecutionContext context)
        {

            // 添加
             db.InsertAsync(new User
            {
                Account = "张三",
                Password = "123456",

            }) ; 



            return ExecutionResult.Next();
        }
    }
}
